package com.augurit.wf.bi.service;

import com.augurit.common.base.service.ICrudService;
import com.augurit.wf.bi.web.form.WfBusInstanceForm;
import com.augurit.wf.common.entity.WfBusInstance;
import com.augurit.wf.common.form.WfBusBaseEntity;

public interface IWfBusInstanceService extends ICrudService<WfBusInstanceForm, Long> {
	
	public WfBusInstanceForm getByWfProcInstId(String wfInstanceId);
	
	/**
	 * 根据流程实例id删除
	 * @param templateCode
	 */
	public void deleteByProcInstId(String procInstId);
	
	/**
	 * 同步业务摘要信息
	 * @param masterEntity
	 * @param masterEntityKey
	 */
//	public void syncSummaryForSql(final String masterEntity, final String masterEntityKey);
	
	/**
	 * 同步主业务实体信息到汇总字段中
	 * @param <T>
	 * @param masterEntity
	 * @param masterEntityKey
	 * @param form
	 */
	public <T extends WfBusBaseEntity> void syncSummary(final String masterEntity, final String masterEntityKey, final T form);
	
	public WfBusInstance getByMasterEntityAndKey(final String masterEntity, final String masterEntityKey);

	public WfBusInstanceForm getInstanceByTaskId(String taskid);

	public WfBusInstance getByProcInstId(String procInsId);
}